Move print preview command to gtksettings.c
authorMatthias Clasen <mclasen@redhat.com>
Mon, 1 Dec 2014 04:43:07 +0000 (23:43 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 1 Dec 2014 04:43:52 +0000 (23:43 -0500)
Having this in the source seems more appropriate.

configure.ac
gtk/Makefile.am
gtk/gtksettings.c

index 58163d84b8429f9d6651ae40f1f0737921f15242..6546fbe7d916288ce86a871e3e8ff2dc5cb76c48 100644 (file)
@@ -399,7 +399,6 @@ if test "x$enable_quartz_backend" = xyes; then
   # Pull in gio-unix for GDesktopAppInfo usage, see at least
   # gdkapplaunchcontext-x11.c
   have_gio_unix=yes
-
 else
   AM_CONDITIONAL(USE_QUARTZ, false)
 fi
index 14a76a9a0c2ea1cf0c845d8f36f4b613819db904..d897df8d0f2ac71af6c0e2dc9b4faa3279a10e87 100644 (file)
@@ -2,12 +2,6 @@ AUTOMAKE_OPTIONS = subdir-objects
 
 include $(top_srcdir)/Makefile.decl
 
-if USE_QUARTZ
-GTK_PRINT_PREVIEW_COMMAND="open -a /Applications/Preview.app %f"
-else
-GTK_PRINT_PREVIEW_COMMAND="evince --unlink-tempfile --preview --print-settings %s %f"
-endif
-
 AM_CPPFLAGS =                                          \
        -DG_LOG_DOMAIN=\"Gtk\"                          \
        -DGTK_LIBDIR=\"$(libdir)\"                      \
@@ -19,12 +13,11 @@ AM_CPPFLAGS =                                               \
        -DGTK_HOST=\"$(host)\"                          \
        -DGTK_COMPILATION                               \
        -DGTK_PRINT_BACKENDS=\"$(GTK_PRINT_BACKENDS)\"  \
-       -DGTK_PRINT_PREVIEW_COMMAND=\"$(GTK_PRINT_PREVIEW_COMMAND)\"    \
+       -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED          \
        -I$(top_builddir)                               \
        -I$(top_builddir)/gtk                           \
        -I$(top_srcdir)                                 \
        -I$(top_srcdir)/gdk                             \
-       -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED          \
        $(GMODULE_CFLAGS)                               \
        $(GTK_DEBUG_FLAGS)                              \
        $(GDK_HIDDEN_VISIBILITY_CFLAGS)                 \
index 0b6c41f56cbda95d3097cc65c6fb19b3591261a5..180b42e074e5e945ec6950776827a4e2341a764e 100644 (file)
 
 #include "deprecated/gtkrc.h"
 
+#ifdef GDK_WINDOWING_QUARTZ
+#define PRINT_PREVIEW_COMMAND "open -a /Applications/Preview.app %f"
+#else
+#define PRINT_PREVIEW_COMMAND "evince --unlink-tempfile --preview --print-settings %s %f"
+#endif
+
 /**
  * SECTION:gtksettings
  * @Short_description: Sharing settings between applications
@@ -987,7 +993,7 @@ gtk_settings_class_init (GtkSettingsClass *class)
                                              g_param_spec_string ("gtk-print-preview-command",
                                                                   P_("Default command to run when displaying a print preview"),
                                                                   P_("Command to run when displaying a print preview"),
-                                                                  GTK_PRINT_PREVIEW_COMMAND,
+                                                                  PRINT_PREVIEW_COMMAND,
                                                                   GTK_PARAM_READWRITE),
                                              NULL);
   g_assert (result == PROP_PRINT_PREVIEW_COMMAND);